var redis = require('redis');
var config = require('./config')
var client = redis.createClient(config.redis.port, config.redis.host);
client.auth(config.redis.password);
client.on("error", function(error) {
  console.log(error);
});
client.select("0", function (err) {
  if (err) console.log("Redis connection failed:" + err.message);
  else console.log("Redis connection success.");
});
module.exports = client;
